package com.techsoul.module.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.techsoul.common.core.pojo.vo.UserVo;
import com.techsoul.module.basic.pojo.vo.CustomerVo;
import com.techsoul.module.order.pojo.entity.ReturnOrder;
import com.techsoul.module.order.pojo.entity.ReturnOrderItem;
import com.techsoul.module.order.pojo.param.ReturnOrderItemSaveParam;
import com.techsoul.module.order.pojo.param.ReturnOrderItemSearchParam;
import com.techsoul.module.order.pojo.vo.ReturnOrderItemVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 退货单明细 Service接口
 * 
 * @author liuen
 * @date 2020-12-07
 */
public interface IReturnOrderItemService {

    /**
     * 新增
     * @param params
     * @return
     */
    String insert(ReturnOrderItemSaveParam params);

    /**
     * 删除
     * @param id
     * @return
     */
    Integer delete(String id);

    /**
     * 批量删除
     * @param idList
     */
    Integer batchDelete(List<String> idList);

    /**
     * 修改
     * @param id
     * @param params
     * @return
     */
    Integer update(String id, ReturnOrderItemSaveParam params);
    ReturnOrder addNewReturnOrder(ReturnOrderItemVo salesOrderItemVo, UserVo user, CustomerVo customerVo, int line);
    ReturnOrderItem addNewItem(ReturnOrder newSalesOrder, ReturnOrderItemVo data, UserVo user, int itemNo, int line);
    void genOperationLog(ReturnOrderItem data,UserVo user );
    /**
     * 详情
     * @param id
     * @return
     */
    ReturnOrderItemVo findById(String id);
    String importOrderFromMq(ReturnOrderItemVo returnOrderItemVo,String customerNo);
    List<ReturnOrderItemVo> findByCustReturnOrderItemNo(String custReturnOrderItemNo);
    ReturnOrderItemVo removeSpecialChar(ReturnOrderItemVo input);
    /**
     * 列表
     * @param params
     * @return
     */
    List<ReturnOrderItemVo> findAll(ReturnOrderItemSearchParam params);

    /**
     * 列表-分页
     * @param params
     * @param current
     * @param pageSize
     * @return
     */
    IPage<ReturnOrderItemVo> findAll(ReturnOrderItemSearchParam params, Integer current, Integer pageSize);

    /**
     * 导入
     * @param file
     * @return
     */
    String importData(String customerNo, MultipartFile file);
    /**
     * 导入模板
     */
    String importTemplate();
}
